From f54e4bc5879ddc8d53af8f7e58086613352beffc Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 5 Dec 2008 15:21:59 +0000 Subject: [PATCH] x86/32on64: adjust address when converting syscall to fault The faulting address is at the start of the syscall instruction rather than at the following one. Signed-off-by: Jan Beulich --- xen/arch/x86/x86_64/compat/entry.S | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/x86_64/compat/entry.S b/xen/arch/x86/x86_64/compat/entry.S index 085babedc4..f08c180fd9 100644 --- a/xen/arch/x86/x86_64/compat/entry.S +++ b/xen/arch/x86/x86_64/compat/entry.S @@ -234,6 +234,7 @@ ENTRY(compat_syscall) call compat_create_bounce_frame jmp compat_test_all_events 2: movl $TRAP_gp_fault,UREGS_entry_vector(%rsp) + subl $2,UREGS_rip(%rsp) movq VCPU_gp_fault_addr(%rbx),%rax movzwl VCPU_gp_fault_sel(%rbx),%esi movb $(TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE|TBF_INTERRUPT),%cl -- 2.30.2